#encoding=utf-8
import urllib2
import urllib

url = 'http://www.baidu.com/s'

word = {'wd':'传播智客'}
word = urllib.urlencode(word)
newurl = url + '?' + word

headers = {"User-Agent": 'ozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50'}

request = urllib2.Request(newurl, headers=headers)
response = urllib2.urlopen(request)

print response.read()